//
//  JFDynamicCell.m
//  JobFree2.0
//
//  Created by xxcao on 2017/5/31.
//  Copyright © 2017年 Dale. All rights reserved.
//

#import "JFDynamicCell.h"
#import "YYKit.h"

@implementation JFDynamicCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.headImgV = [[UIImageView alloc] init];
        self.headImgV.backgroundColor = [UIColor redColor];
        [self addSubview:self.headImgV];
        [self.headImgV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(10);
            make.top.equalTo(self).offset(10);
            make.width.mas_equalTo(60);
            make.height.mas_equalTo(60);
        }];
        
        self.titleLab = [[UILabel alloc] init];
        self.titleLab.font = [UIFont systemFontOfSize:17];
        self.titleLab.textColor = [UIColor colorWithHexString:@"333333"];
        [self addSubview:self.titleLab];
        [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.headImgV.mas_right).offset(10);
            make.top.equalTo(self).offset(10);
            make.height.mas_equalTo(30);
            make.right.equalTo(self).offset(-10);
        }];

        self.contentLab = [[UILabel alloc] init];
        self.contentLab.textColor = [UIColor colorWithHexString:@"666666"];
        self.contentLab.numberOfLines = 0;
        self.contentLab.font = [UIFont systemFontOfSize:14];
        [self addSubview:self.contentLab];
        [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.headImgV.mas_right).offset(10);
            make.top.equalTo(self.titleLab.mas_bottom).offset(10);
            make.right.equalTo(self).offset(-10);
            make.bottom.equalTo(self).offset(-10);
        }];
    }
    return self;
}

- (void)loadCellData:(id)object {
    
    self.titleLab.text = @"北京欢迎您！";
    self.contentLab.text = object;

}

@end
